<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>keyczar.keydata</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="keyczar-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Keyczar</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="keyczar-module.html">Package&nbsp;keyczar</a> ::
        Module&nbsp;keydata
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="keyczar.keydata-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="keyczar.keydata-module.html">Module keyczar.keydata</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/python2.4</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright 2008 Google Inc.</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># you may not use this file except in compliance with the License.</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You may obtain a copy of the License at</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># </tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#      http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># </tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Unless required by applicable law or agreed to in writing, software</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># See the License for the specific language governing permissions and</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># limitations under the License.</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">Encodes the two classes storing data about keys:</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">  - KeyMetadata: stores metadata</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring">  - KeyVersion: stores key strings and types</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">@author: arkajit.dey@gmail.com (Arkajit Dey)</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">                 </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">simplejson</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module keyczar.errors=keyczar.errors-module.html"><a title="keyczar.errors" class="py-name" href="#" onclick="return doclink('link-0', 'errors', 'link-0');">errors</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module keyczar.keyinfo=keyczar.keyinfo-module.html"><a title="keyczar.keyinfo" class="py-name" href="#" onclick="return doclink('link-1', 'keyinfo', 'link-1');">keyinfo</a></tt> </tt>
<a name="KeyMetadata"></a><div id="KeyMetadata-def"><a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt> <a class="py-toggle" href="#" id="KeyMetadata-toggle" onclick="return toggle('KeyMetadata');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html">KeyMetadata</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="KeyMetadata-expanded"><a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">  <tt class="py-docstring">"""Encodes metadata for a keyset with a name, purpose, type, and versions."""</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">     </tt>
<a name="KeyMetadata.__init__"></a><div id="KeyMetadata.__init__-def"><a name="L33"></a><tt class="py-lineno"> 33</tt> <a class="py-toggle" href="#" id="KeyMetadata.__init__-toggle" onclick="return toggle('KeyMetadata.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">purpose</tt><tt class="py-op">,</tt> <tt class="py-param">type</tt><tt class="py-op">,</tt> <tt class="py-param">encrypted</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyMetadata.__init__-expanded"><a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">name</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">purpose</tt> <tt class="py-op">=</tt> <tt class="py-name">purpose</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type</tt> <tt class="py-op">=</tt> <tt class="py-name">type</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">encrypted</tt> <tt class="py-op">=</tt> <tt class="py-name">encrypted</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__versions</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt>  <tt class="py-comment"># dictionary from version nums to KeyVersions</tt> </tt>
</div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">     </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">  <tt id="link-2" class="py-name" targets="Variable keyczar.keyczar.Keyczar.versions=keyczar.keyczar.Keyczar-class.html#versions,Variable keyczar.keydata.KeyMetadata.versions=keyczar.keydata.KeyMetadata-class.html#versions"><a title="keyczar.keyczar.Keyczar.versions
keyczar.keydata.KeyMetadata.versions" class="py-name" href="#" onclick="return doclink('link-2', 'versions', 'link-2');">versions</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__versions</tt><tt class="py-op">.</tt><tt class="py-name">values</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">     </tt>
<a name="KeyMetadata.__str__"></a><div id="KeyMetadata.__str__-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="KeyMetadata.__str__-toggle" onclick="return toggle('KeyMetadata.__str__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata.__str__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyMetadata.__str__-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">"name"</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">name</tt><tt class="py-op">,</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">                             <tt class="py-string">"purpose"</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">purpose</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">                             <tt class="py-string">"type"</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">                             <tt class="py-string">"encrypted"</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">encrypted</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">                             <tt class="py-string">"versions"</tt><tt class="py-op">:</tt> <tt class="py-op">[</tt><tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt><tt class="py-op">)</tt>  </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">                                          <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name"><a title="keyczar.keyczar.Keyczar.versions
keyczar.keydata.KeyMetadata.versions" class="py-name" href="#" onclick="return doclink('link-3', 'versions', 'link-2');">versions</a></tt><tt class="py-op">]</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">   </tt>
<a name="KeyMetadata.AddVersion"></a><div id="KeyMetadata.AddVersion-def"><a name="L50"></a><tt class="py-lineno"> 50</tt> <a class="py-toggle" href="#" id="KeyMetadata.AddVersion-toggle" onclick="return toggle('KeyMetadata.AddVersion');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html#AddVersion">AddVersion</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">version</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata.AddVersion-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyMetadata.AddVersion-expanded"><a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">    Adds given version and returns True if successful.</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">    @param version: version to add</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">    @type version: L{KeyVersion}</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"><tt class="py-docstring">    @return: True if version was successfully added (i.e. no previous version</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-docstring">      had the same version number), False otherwise.</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">    @rtype: boolean</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">    <tt class="py-name">num</tt> <tt class="py-op">=</tt> <tt class="py-name">version</tt><tt class="py-op">.</tt><tt class="py-name">version_number</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">num</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__versions</tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__versions</tt><tt class="py-op">[</tt><tt class="py-name">num</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">version</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">   </tt>
<a name="KeyMetadata.RemoveVersion"></a><div id="KeyMetadata.RemoveVersion-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="KeyMetadata.RemoveVersion-toggle" onclick="return toggle('KeyMetadata.RemoveVersion');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html#RemoveVersion">RemoveVersion</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">version_number</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata.RemoveVersion-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyMetadata.RemoveVersion-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-docstring">    Removes version with given version number and returns it if it exists.</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">    @param version_number: version number to remove</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">    @type version_number: integer</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">    @return: the removed version if it exists</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">    @rtype: L{KeyVersion}</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">    @raise KeyczarError: if the version number is non-existent</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__versions</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-name">version_number</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">      <tt class="py-keyword">raise</tt> <tt id="link-4" class="py-name"><a title="keyczar.errors" class="py-name" href="#" onclick="return doclink('link-4', 'errors', 'link-0');">errors</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Class keyczar.errors.KeyczarError=keyczar.errors.KeyczarError-class.html"><a title="keyczar.errors.KeyczarError" class="py-name" href="#" onclick="return doclink('link-5', 'KeyczarError', 'link-5');">KeyczarError</a></tt><tt class="py-op">(</tt><tt class="py-string">"No such version number: %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">version_number</tt><tt class="py-op">)</tt> </tt>
</div><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">   </tt>
<a name="KeyMetadata.GetVersion"></a><div id="KeyMetadata.GetVersion-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="KeyMetadata.GetVersion-toggle" onclick="return toggle('KeyMetadata.GetVersion');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html#GetVersion">GetVersion</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">version_number</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata.GetVersion-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyMetadata.GetVersion-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-docstring">    Return the version corresponding to the given version number.</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">    @param version_number: integer version number of desired version</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">    @type version_number: integer</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">    @return: the corresponding version if it exists</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">    @rtype: L{KeyVersion}</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"><tt class="py-docstring">    @raise KeyczarError: if the version number is non-existent.</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__versions</tt><tt class="py-op">[</tt><tt class="py-name">version_number</tt><tt class="py-op">]</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">      <tt class="py-keyword">raise</tt> <tt id="link-6" class="py-name"><a title="keyczar.errors" class="py-name" href="#" onclick="return doclink('link-6', 'errors', 'link-0');">errors</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="keyczar.errors.KeyczarError" class="py-name" href="#" onclick="return doclink('link-7', 'KeyczarError', 'link-5');">KeyczarError</a></tt><tt class="py-op">(</tt><tt class="py-string">"No such version number: %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">version_number</tt><tt class="py-op">)</tt> </tt>
</div><a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">   </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">  <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="KeyMetadata.Read"></a><div id="KeyMetadata.Read-def"><a name="L102"></a><tt class="py-lineno">102</tt> <a class="py-toggle" href="#" id="KeyMetadata.Read-toggle" onclick="return toggle('KeyMetadata.Read');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyMetadata-class.html#Read">Read</a><tt class="py-op">(</tt><tt class="py-param">json_string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyMetadata.Read-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyMetadata.Read-expanded"><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring">    Return KeyMetadata object constructed from JSON string representation.</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring">    @param json_string: a JSON representation of a KeyMetadata object</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">    @type json_string: string</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"><tt class="py-docstring">    @return: the constructed KeyMetadata object</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"><tt class="py-docstring">    @rtype: L{KeyMetadata}</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-name">meta</tt> <tt class="py-op">=</tt> <tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">json_string</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt class="py-name">kmd</tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name" targets="Class keyczar.keydata.KeyMetadata=keyczar.keydata.KeyMetadata-class.html"><a title="keyczar.keydata.KeyMetadata" class="py-name" href="#" onclick="return doclink('link-8', 'KeyMetadata', 'link-8');">KeyMetadata</a></tt><tt class="py-op">(</tt><tt class="py-name">meta</tt><tt class="py-op">[</tt><tt class="py-string">'name'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name"><a title="keyczar.keyinfo" class="py-name" href="#" onclick="return doclink('link-9', 'keyinfo', 'link-1');">keyinfo</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Function keyczar.keyinfo.GetPurpose()=keyczar.keyinfo-module.html#GetPurpose"><a title="keyczar.keyinfo.GetPurpose" class="py-name" href="#" onclick="return doclink('link-10', 'GetPurpose', 'link-10');">GetPurpose</a></tt><tt class="py-op">(</tt><tt class="py-name">meta</tt><tt class="py-op">[</tt><tt class="py-string">'purpose'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt>  </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                      <tt id="link-11" class="py-name"><a title="keyczar.keyinfo" class="py-name" href="#" onclick="return doclink('link-11', 'keyinfo', 'link-1');">keyinfo</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Function keyczar.keyinfo.GetType()=keyczar.keyinfo-module.html#GetType"><a title="keyczar.keyinfo.GetType" class="py-name" href="#" onclick="return doclink('link-12', 'GetType', 'link-12');">GetType</a></tt><tt class="py-op">(</tt><tt class="py-name">meta</tt><tt class="py-op">[</tt><tt class="py-string">'type'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">meta</tt><tt class="py-op">[</tt><tt class="py-string">'encrypted'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">version</tt> <tt class="py-keyword">in</tt> <tt class="py-name">meta</tt><tt class="py-op">[</tt><tt class="py-string">'versions'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">      <tt class="py-name">kmd</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method keyczar.keyczar.GenericKeyczar.AddVersion()=keyczar.keyczar.GenericKeyczar-class.html#AddVersion,Method keyczar.keydata.KeyMetadata.AddVersion()=keyczar.keydata.KeyMetadata-class.html#AddVersion"><a title="keyczar.keyczar.GenericKeyczar.AddVersion
keyczar.keydata.KeyMetadata.AddVersion" class="py-name" href="#" onclick="return doclink('link-13', 'AddVersion', 'link-13');">AddVersion</a></tt><tt class="py-op">(</tt><tt id="link-14" class="py-name" targets="Class keyczar.keydata.KeyVersion=keyczar.keydata.KeyVersion-class.html"><a title="keyczar.keydata.KeyVersion" class="py-name" href="#" onclick="return doclink('link-14', 'KeyVersion', 'link-14');">KeyVersion</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Static Method keyczar.keyczar.Crypter.Read()=keyczar.keyczar.Crypter-class.html#Read,Static Method keyczar.keyczar.Encrypter.Read()=keyczar.keyczar.Encrypter-class.html#Read,Static Method keyczar.keyczar.GenericKeyczar.Read()=keyczar.keyczar.GenericKeyczar-class.html#Read,Static Method keyczar.keyczar.Keyczar.Read()=keyczar.keyczar.Keyczar-class.html#Read,Static Method keyczar.keyczar.Signer.Read()=keyczar.keyczar.Signer-class.html#Read,Static Method keyczar.keyczar.Verifier.Read()=keyczar.keyczar.Verifier-class.html#Read,Static Method keyczar.keydata.KeyMetadata.Read()=keyczar.keydata.KeyMetadata-class.html#Read,Static Method keyczar.keydata.KeyVersion.Read()=keyczar.keydata.KeyVersion-class.html#Read,Static Method keyczar.keys.AesKey.Read()=keyczar.keys.AesKey-class.html#Read,Static Method keyczar.keys.DsaPrivateKey.Read()=keyczar.keys.DsaPrivateKey-class.html#Read,Static Method keyczar.keys.DsaPublicKey.Read()=keyczar.keys.DsaPublicKey-class.html#Read,Static Method keyczar.keys.HmacKey.Read()=keyczar.keys.HmacKey-class.html#Read,Static Method keyczar.keys.RsaPrivateKey.Read()=keyczar.keys.RsaPrivateKey-class.html#Read,Static Method keyczar.keys.RsaPublicKey.Read()=keyczar.keys.RsaPublicKey-class.html#Read"><a title="keyczar.keyczar.Crypter.Read
keyczar.keyczar.Encrypter.Read
keyczar.keyczar.GenericKeyczar.Read
keyczar.keyczar.Keyczar.Read
keyczar.keyczar.Signer.Read
keyczar.keyczar.Verifier.Read
keyczar.keydata.KeyMetadata.Read
keyczar.keydata.KeyVersion.Read
keyczar.keys.AesKey.Read
keyczar.keys.DsaPrivateKey.Read
keyczar.keys.DsaPublicKey.Read
keyczar.keys.HmacKey.Read
keyczar.keys.RsaPrivateKey.Read
keyczar.keys.RsaPublicKey.Read" class="py-name" href="#" onclick="return doclink('link-15', 'Read', 'link-15');">Read</a></tt><tt class="py-op">(</tt><tt class="py-name">version</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">kmd</tt> </tt>
</div></div><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt>
<a name="KeyVersion"></a><div id="KeyVersion-def"><a name="L119"></a><tt class="py-lineno">119</tt> <a class="py-toggle" href="#" id="KeyVersion-toggle" onclick="return toggle('KeyVersion');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="keyczar.keydata.KeyVersion-class.html">KeyVersion</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyVersion-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="KeyVersion-expanded"><a name="KeyVersion.__init__"></a><div id="KeyVersion.__init__-def"><a name="L120"></a><tt class="py-lineno">120</tt> <a class="py-toggle" href="#" id="KeyVersion.__init__-toggle" onclick="return toggle('KeyVersion.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyVersion-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">v</tt><tt class="py-op">,</tt> <tt class="py-param">s</tt><tt class="py-op">,</tt> <tt class="py-param">export</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyVersion.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyVersion.__init__-expanded"><a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">version_number</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__status</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">exportable</tt> <tt class="py-op">=</tt> <tt class="py-name">export</tt> </tt>
</div><a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">     </tt>
<a name="KeyVersion.__SetStatus"></a><div id="KeyVersion.__SetStatus-def"><a name="L125"></a><tt class="py-lineno">125</tt> <a class="py-toggle" href="#" id="KeyVersion.__SetStatus-toggle" onclick="return toggle('KeyVersion.__SetStatus');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyVersion-class.html#__SetStatus">__SetStatus</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">new_status</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyVersion.__SetStatus-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyVersion.__SetStatus-expanded"><a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">new_status</tt><tt class="py-op">:</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__status</tt> <tt class="py-op">=</tt> <tt class="py-name">new_status</tt> </tt>
</div><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">       </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">  <tt id="link-16" class="py-name" targets="Variable keyczar.keydata.KeyVersion.status=keyczar.keydata.KeyVersion-class.html#status"><a title="keyczar.keydata.KeyVersion.status" class="py-name" href="#" onclick="return doclink('link-16', 'status', 'link-16');">status</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt class="py-keyword">lambda</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__status</tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Method keyczar.keydata.KeyVersion.__SetStatus()=keyczar.keydata.KeyVersion-class.html#__SetStatus"><a title="keyczar.keydata.KeyVersion.__SetStatus" class="py-name" href="#" onclick="return doclink('link-17', '__SetStatus', 'link-17');">__SetStatus</a></tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">   </tt>
<a name="KeyVersion.__str__"></a><div id="KeyVersion.__str__-def"><a name="L131"></a><tt class="py-lineno">131</tt> <a class="py-toggle" href="#" id="KeyVersion.__str__-toggle" onclick="return toggle('KeyVersion.__str__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyVersion-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyVersion.__str__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyVersion.__str__-expanded"><a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">simplejson</tt><tt class="py-op">.</tt><tt class="py-name">dumps</tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-string">"versionNumber"</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">version_number</tt><tt class="py-op">,</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                             <tt class="py-string">"status"</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="keyczar.keydata.KeyVersion.status" class="py-name" href="#" onclick="return doclink('link-18', 'status', 'link-16');">status</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">                             <tt class="py-string">"exportable"</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">exportable</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
</div><a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">   </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">  <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="KeyVersion.Read"></a><div id="KeyVersion.Read-def"><a name="L137"></a><tt class="py-lineno">137</tt> <a class="py-toggle" href="#" id="KeyVersion.Read-toggle" onclick="return toggle('KeyVersion.Read');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="keyczar.keydata.KeyVersion-class.html#Read">Read</a><tt class="py-op">(</tt><tt class="py-param">version</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="KeyVersion.Read-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="KeyVersion.Read-expanded"><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">    Return KeyVersion object constructed from dictionary derived from JSON.</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring">    @param version: a dictionary obtained from a JSON string representation</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line"><tt class="py-docstring">    @type version: dictionary</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line"><tt class="py-docstring">    @return: constructed KeyVersion object</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line"><tt class="py-docstring">    @rtype: L{KeyVersion}</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-19" class="py-name"><a title="keyczar.keydata.KeyVersion" class="py-name" href="#" onclick="return doclink('link-19', 'KeyVersion', 'link-14');">KeyVersion</a></tt><tt class="py-op">(</tt><tt class="py-name">version</tt><tt class="py-op">[</tt><tt class="py-string">'versionNumber'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">                      <tt id="link-20" class="py-name"><a title="keyczar.keyinfo" class="py-name" href="#" onclick="return doclink('link-20', 'keyinfo', 'link-1');">keyinfo</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Function keyczar.keyinfo.GetStatus()=keyczar.keyinfo-module.html#GetStatus"><a title="keyczar.keyinfo.GetStatus" class="py-name" href="#" onclick="return doclink('link-21', 'GetStatus', 'link-21');">GetStatus</a></tt><tt class="py-op">(</tt><tt class="py-name">version</tt><tt class="py-op">[</tt><tt class="py-string">'status'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">                      <tt class="py-name">version</tt><tt class="py-op">[</tt><tt class="py-string">'exportable'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="keyczar-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Keyczar</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Aug 10 17:05:06 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
